﻿@{string renminbi = "￥";}
@Html.Raw(Model.showWarp ? "<div class=\"members_con\"><section class=\"members_goodspic\"><ul id=\"" + Model.warpId + "\">" : "")
            @if (@Model.list.Count > 0)
            {
                for (int i = 0; i < @Model.list.Count; i++)
                {

                    if (i % 3 == 0)
                    {
                        var goods = @Model.list[i];
                        <li class="biggoods">
                            <a class="goodsimg" href="@goods.link"><img class="lazyload" data-url="@goods.pic" src="~/Areas/Mobile/Templates/Default/images/blank.gif"></a>
                            @if (@Model.showName || @Model.showPrice)
                            {
                                <section class="members_goodsimg_name rename">
                                    @if (@Model.showName)
                                    {
                                        <a href="@goods.link"> @goods.title </a>
                                    }
                                    @if (@Model.showIco)
                                    {
                                        if (goods.is_limitbuy)
                                        {
                                            <i><a href="@goods.link">抢购</a></i>
                                        }
                                        else
                                        {
                                            <i class="add-buy-btn"><a href="javascript:void(0)" onclick="buyproduct(this)" class="buyproduct" data-pid="@goods.product_id">购买</a></i>
                                        }
                                    }
                                    <span>

                                        @if (@Model.showPrice)
                                        {
                                            @renminbi;@goods.price;
                                            <span class="original_price"><s>&yen;@goods.original_price</s></span>
                                        }
                                    </span>
                                    <span>销量：<i>@goods.SaleCounts</i></span>
                                </section>
                            }
                        </li>
                    }
                    else if (i % 3 == 1)
                    {
                        var goods = @Model.list[i];
                        <li class="mingoods goods_even">
                            <a class="goodsimg" href="@goods.link"><img class ="lazyload" data-url="@goods.pic" src="@goods.pic"></a>
                            @if (@Model.showIco || @Model.showPrice)
                            {

                                <span class="replace">
                                    @if (@Model.showName)
                                    {
                                        <a href="@goods.link"> @goods.title </a>
                                    }
                                    @if (@Model.showIco)
                                    {
                                        if (goods.is_limitbuy)
                                        {
                                            <i><a href="@goods.link">抢购</a></i>
                                        }
                                        else
                                        {
                                            <i class="add-buy-btn"><a href="javascript:void(0)" onclick="buyproduct(this)" class="buyproduct" data-pid="@goods.product_id">购买</a></i>
                                        }
                                    }
                                    @if (@Model.showPrice)
                                    {
                                        @renminbi;@goods.price
                                        <span class="original_price"><s>&yen; @goods.original_price</s></span>
                                    }
                                </span>
                                 <span class="xl1">销量：<i>@goods.SaleCounts</i></span>
                            }
                        </li>

                    }
                    else if (i % 3 == 2)
                    {
                        var goods = @Model.list[i];
                        <li class="mingoods goods_odd">
                            <a class="goodsimg" href="@goods.link"><img class="lazyload" data-url="@goods.pic" src="@goods.pic"></a>
                            @if (@Model.showIco || @Model.showPrice)
                            {
                                <span class="replace">
                                    @if (@Model.showName)
                                    {
                                        <a href="@goods.link"> @goods.title </a>
                                    }
                                    @if (@Model.showIco)
                                    {
                                        if (goods.is_limitbuy)
                                        {
                                            <i><a href="@goods.link">抢购</a></i>
                                        }
                                        else
                                        {
                                            <i class="add-buy-btn"><a href="javascript:void(0)" onclick="buyproduct(this)" class="buyproduct" data-pid="@goods.product_id">购买</a></i>
                                        }
                                    }
                                    @if (@Model.showPrice)
                                    {
                                        @renminbi;@goods.price;
                                        <span class="original_price"><s>&yen; @goods.original_price;</s></span>
                                    }
                                </span>
                                <span class="xl1">销量：<i>@goods.SaleCounts</i></span>
                            }
                        </li>
                    }
                }
            }
            @Html.Raw(Model.showWarp ? "</ul></section></div>" : "")